package practice06;

public class Teacher extends Person{
    private String klass;

    public Teacher(String name,int age, String klass) {

    }

    public Teacher(String name, int age) {
    }

    public String getKlass() {
        if (klass==null){
           return super.introduce()+"I am a Teacher. I teach No Class.";
        }
        return this.klass;
    }

    public void setKlass(String klass) {
        this.klass = klass;
    }

    @Override
    public String toString() {
        return "Student{" +
                "klass=" + klass +
                '}';
    }

    public String introduce(){
        return super.introduce()+" I am a Teacher. I am at Class 2.";
    }
}
